#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef long long LL;
const int N = 2e6 + 10;
void solve() {
    int n;
    cin >> n;
    vector<int> arr(n * 2 + 10);
    vector<int> brr, crr;
    brr.push_back(0);
    crr.push_back(0);
    int sum = 0;
    for(int i = 1; i <= n * 2 ; i ++) {
        cin >> arr[i];
        sum += arr[i];
        if(i % 2 == 1) brr.push_back(arr[i]);
        else crr.push_back(arr[i]);
    }
    for(int i = 1; i <= 2 * n; i ++) {
        arr[i] = arr[i] + arr[i - 1];
    }
    for(int i = 1; i <= n; i ++) {
        brr[i] = brr[i] + brr[i - 1];
    }
    for(int i = 1; i <= n; i ++) {
        crr[i] = crr[i] + crr[i - 1];
    }
    int l1 = 1, l2 = 1, r1 = n - 1, r2 = n;
    int l3 = 1, r3 = 0;
    for(int i = 1; i <= n; i ++) {
        int pos2 = 0;
        if(i % 2 == 1) {
            pos2 = brr[r2] - brr[l2 - 1];
            r2 -= 1;
            l2 += 1;
        } else {
            pos2 = crr[r1] - crr[l1 - 1];
            r1 -= 1;
            l1 += 1;
        }
        int pos3 = 0;
        if(r3 >= l3) pos3 = arr[r3] - arr[l3 - 1];
        r3 ++;
        cout << sum - pos3 - pos2 - pos2 - pos3 << ' ';
    }
    cout << endl;
}
signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    cin >> t;
    while(t--)
    {
        solve();
    }
}